/*******************************************************************************
 * Size: 24 px
 * Bpp: 2
 * Opts: 
 ******************************************************************************/

#ifdef LV_LVGL_H_INCLUDE_SIMPLE
#include "lvgl.h"
#else
#include "lvgl/lvgl.h"
#endif

#ifndef FONT_24_MENU_BTN
#define FONT_24_MENU_BTN 1
#endif

#if FONT_24_MENU_BTN

/*-----------------
 *    BITMAPS
 *----------------*/

/*Store the image of the glyphs*/
static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
    /* U+56DE "回" */
    0x0, 0x0, 0x0, 0x0, 0xb4, 0x0, 0x0, 0x56,
    0xbf, 0xff, 0xc3, 0xbf, 0xff, 0xff, 0xff, 0xf0,
    0xbf, 0xff, 0xe9, 0x56, 0xfc, 0x1f, 0xe9, 0x1,
    0x90, 0x7f, 0x3, 0xf2, 0xaf, 0xfe, 0x1f, 0x80,
    0xfc, 0x7f, 0xff, 0xc7, 0xe0, 0x2f, 0x4f, 0x43,
    0xe2, 0xf4, 0xb, 0xe3, 0xe6, 0xf0, 0xfc, 0x1,
    0xf8, 0xff, 0xfc, 0x3f, 0x0, 0x7f, 0x3f, 0xef,
    0xf, 0xc0, 0xf, 0xc2, 0x40, 0x7, 0xe0, 0x3,
    0xf5, 0x5a, 0xaf, 0xf4, 0x0, 0xff, 0xff, 0xff,
    0xfc, 0x0, 0x3f, 0xff, 0xff, 0xff, 0x0, 0x7,
    0xc0, 0x0, 0x7, 0x80, 0x0, 0x60, 0x0, 0x0,
    0x40, 0x0,

    /* U+7F6E "置" */
    0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5,
    0xab, 0xfd, 0x0, 0x3, 0xff, 0xff, 0xff, 0xf0,
    0x0, 0x2f, 0xff, 0x7d, 0x7e, 0x0, 0x1, 0xf9,
    0xf3, 0xeb, 0xd0, 0x0, 0xf, 0xdf, 0xff, 0xfc,
    0x0, 0x0, 0xff, 0xff, 0xff, 0xd0, 0x0, 0x3,
    0xd3, 0xfb, 0xf8, 0x0, 0x1, 0xaf, 0xff, 0xff,
    0xc0, 0x0, 0x1f, 0xff, 0xfa, 0x54, 0x0, 0x0,
    0x3e, 0xbf, 0xfe, 0x0, 0x0, 0x1, 0xff, 0xff,
    0xf0, 0x0, 0x0, 0xf, 0xea, 0x7f, 0x0, 0x0,
    0x0, 0xff, 0xfa, 0xf0, 0x0, 0x0, 0xf, 0xfb,
    0xaf, 0x0, 0x0, 0x0, 0xfe, 0xf6, 0xf0, 0x0,
    0x0, 0xf, 0xff, 0xaf, 0x0, 0x0, 0x0, 0xfe,
    0xf7, 0xf0, 0x0, 0x0, 0xf, 0xff, 0xff, 0x5,
    0x0, 0x0, 0xfe, 0x5b, 0xff, 0xf4, 0xbf, 0xff,
    0xff, 0xff, 0xff, 0xc3, 0xff, 0xff, 0xfe, 0xaa,
    0xb8, 0xf, 0x90, 0x0, 0x0, 0x0, 0x0, 0x0,
    0x0, 0x0, 0x0, 0x0,

    /* U+8BBE "设" */
    0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10,
    0x5, 0x1f, 0xc0, 0x0, 0x0, 0xfd, 0xf, 0xff,
    0xd0, 0x0, 0x0, 0x7f, 0xb, 0xff, 0xc0, 0x0,
    0x0, 0x7f, 0xb, 0xcb, 0x80, 0x0, 0x0, 0x9,
    0xf, 0x8f, 0x89, 0x0, 0x0, 0x0, 0xf, 0xf,
    0xef, 0xc0, 0x0, 0x24, 0x2e, 0xf, 0xff, 0x80,
    0x1, 0xfd, 0x3c, 0x3, 0xfe, 0x0, 0x3f, 0xfd,
    0xe5, 0x6f, 0xc0, 0x0, 0x2f, 0xfc, 0x4f, 0xff,
    0xf0, 0x0, 0x9, 0xbc, 0x7, 0xef, 0xe0, 0x0,
    0x0, 0xbc, 0x2f, 0x4f, 0xc0, 0x0, 0x0, 0xbc,
    0x3f, 0xef, 0x40, 0x0, 0x0, 0xbd, 0xc1, 0xfe,
    0x0, 0x0, 0x0, 0xbf, 0x40, 0xff, 0x40, 0x0,
    0x1, 0xfe, 0x2, 0xff, 0xe0, 0x0, 0x2, 0xfc,
    0xb, 0xdb, 0xfd, 0x0, 0x0, 0xb4, 0x3f, 0x2,
    0xff, 0xd0, 0x0, 0x0, 0xf4, 0x0, 0x7f, 0xfc,
    0x0, 0x0, 0x0, 0x0, 0x1e, 0x0,

    /* U+8FD4 "返" */
    0x0, 0x0, 0x0, 0x0, 0xe0, 0x0, 0x0, 0x0,
    0x0, 0x2, 0xf8, 0x0, 0x0, 0xb8, 0x0, 0xf,
    0xf4, 0x0, 0x0, 0xfe, 0xf, 0xbf, 0x80, 0x0,
    0x0, 0x7e, 0xf, 0xe4, 0x0, 0x0, 0x0, 0xd,
    0xf, 0xc0, 0x0, 0x0, 0x0, 0x0, 0xf, 0xc6,
    0xf0, 0x0, 0x0, 0x2c, 0xf, 0xff, 0xfc, 0x0,
    0x1b, 0xff, 0xf, 0xff, 0xfc, 0x0, 0x2f, 0xfe,
    0xf, 0xd2, 0xf0, 0x0, 0x6, 0xbc, 0x1f, 0xff,
    0xe0, 0x0, 0x0, 0xf8, 0x3d, 0x2f, 0xd0, 0x0,
    0x0, 0xfc, 0x3c, 0xf, 0xf4, 0x0, 0x0, 0xbd,
    0xb0, 0x3f, 0xfd, 0x0, 0x0, 0xfc, 0xd0, 0xf4,
    0x7f, 0x0, 0x1f, 0xfa, 0x83, 0xc0, 0x1e, 0x0,
    0x3f, 0xff, 0xff, 0xa9, 0x59, 0x68, 0x6, 0x4b,
    0xff, 0xff, 0xff, 0xf4, 0x0, 0x0, 0x7f, 0xff,
    0xff, 0x80, 0x0, 0x0, 0x1, 0xbf, 0xff, 0x0,
    0x0, 0x0, 0x0, 0x6, 0xfc, 0x0
};


/*---------------------
 *  GLYPH DESCRIPTION
 *--------------------*/

static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = {
    {.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */,
    {.bitmap_index = 0, .adv_w = 384, .box_w = 21, .box_h = 17, .ofs_x = 1, .ofs_y = -1},
    {.bitmap_index = 90, .adv_w = 384, .box_w = 22, .box_h = 24, .ofs_x = 1, .ofs_y = -4},
    {.bitmap_index = 222, .adv_w = 384, .box_w = 24, .box_h = 21, .ofs_x = 0, .ofs_y = -2},
    {.bitmap_index = 348, .adv_w = 384, .box_w = 24, .box_h = 21, .ofs_x = 0, .ofs_y = -2}
};

/*---------------------
 *  CHARACTER MAPPING
 *--------------------*/

static const uint16_t unicode_list_0[] = {
    0x0, 0x2890, 0x34e0, 0x38f6
};

/*Collect the unicode lists and glyph_id offsets*/
static const lv_font_fmt_txt_cmap_t cmaps[] =
{
    {
        .range_start = 22238, .range_length = 14583, .glyph_id_start = 1,
        .unicode_list = unicode_list_0, .glyph_id_ofs_list = NULL, .list_length = 4, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY
    }
};



/*--------------------
 *  ALL CUSTOM DATA
 *--------------------*/

#if LV_VERSION_CHECK(8, 0, 0)
/*Store all the custom data of the font*/
static  lv_font_fmt_txt_glyph_cache_t cache;
static const lv_font_fmt_txt_dsc_t font_dsc = {
#else
static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
    .glyph_bitmap = glyph_bitmap,
    .glyph_dsc = glyph_dsc,
    .cmaps = cmaps,
    .kern_dsc = NULL,
    .kern_scale = 0,
    .cmap_num = 1,
    .bpp = 2,
    .kern_classes = 0,
    .bitmap_format = 0,
#if LV_VERSION_CHECK(8, 0, 0)
    .cache = &cache
#endif
};


/*-----------------
 *  PUBLIC FONT
 *----------------*/

/*Initialize a public general font descriptor*/
#if LV_VERSION_CHECK(8, 0, 0)
const lv_font_t font_24_menu_btn = {
#else
lv_font_t font_24_menu_btn = {
#endif
    .get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt,    /*Function pointer to get glyph's data*/
    .get_glyph_bitmap = lv_font_get_bitmap_fmt_txt,    /*Function pointer to get glyph's bitmap*/
    .line_height = 24,          /*The maximum line height required by the font*/
    .base_line = 4,             /*Baseline measured from the bottom of the line*/
#if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0)
    .subpx = LV_FONT_SUBPX_NONE,
#endif
#if LV_VERSION_CHECK(7, 4, 0) || LVGL_VERSION_MAJOR >= 8
    .underline_position = -2,
    .underline_thickness = 1,
#endif
    .dsc = &font_dsc           /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
};



#endif /*#if FONT_24_MENU_BTN*/

